package org.doc.core.config;

import java.util.Properties;

import org.apache.commons.lang3.StringUtils;
import org.doc.utils.PropUtils;

public class DocConfig {

    private static DocConfig singleJDocConfig = null;

    private static Properties properties;

    public static DocConfig instance(String configFileName) {
        if (singleJDocConfig == null) {
            singleJDocConfig = new DocConfig();
            properties = PropUtils.builderProperties(configFileName);
        }
        return singleJDocConfig;
    };
    
  

    public static String getValue(String key) {
        String value = properties.getProperty(key);
        if(StringUtils.isNotBlank(value)){
            value = value.trim();
        }
        return value;       
    }

}
